﻿<MudPopoverProvider />

<MudDataGrid Items="@_items" Hideable="true" ShowMenuIcon="true">
    <Columns>
        <PropertyColumn Property="x => x.Name" Hidden="false" />
        <PropertyColumn Property="x => x.Age" Hidden="@_hiddenAge" />
        <PropertyColumn Property="x => x.Prop1" @bind-Hidden="@_hiddenProp1" />
        <PropertyColumn Property="x => x.Prop2" Hidden="false" Hideable="false" />
        <PropertyColumn Property="x => x.Prop3" Hidden="@_hiddenProp3" Hideable="false" />
        <PropertyColumn Property="x => x.Prop4" @bind-Hidden="@_hiddenProp4" Hideable="false" />
    </Columns>
</MudDataGrid>

@code {
    private readonly bool _hiddenAge = false;
    private bool _hiddenProp1;
    private readonly bool _hiddenProp3 = false;
    private bool _hiddenProp4;

    private readonly IEnumerable<Model> _items = new List<Model>
    {
        new("John", 45, true, true, true, true),
        new("Johanna", 23, true, true, true, true),
        new("Steve", 32, true, true, true, true)
    };

    public record Model(string Name, int Age, bool Prop1, bool Prop2, bool Prop3, bool Prop4);
}